package com.zbmy.plugin.im.server.core.back.factory;

import com.zbmy.plugin.im.server.core.back.processor.LoginMessageProcessor;
import com.zbmy.plugin.im.server.core.back.processor.LogoutMessageProcessor;
import com.zbmy.plugin.im.server.core.back.processor.MessageProcessor;
import com.zbmy.plugin.im.server.core.protocol.ProtocolHeader;


/**
 * 
 * 处理器工厂  
 * @ClassName: ProcessorFactory    
 * @author 杨乐平    
 * @date 2018年5月4日 下午2:48:32    
 * @version  v 1.0
 */
public class ProcessorFactory {
	public static MessageProcessor getProcessor(byte type){
		if(type == ProtocolHeader.TYPE_LOGIN){
			return new LoginMessageProcessor();
		}else if(type == ProtocolHeader.TYPE_LOGOUT){
			return new LogoutMessageProcessor();
		}
		return null;
	}
}
